﻿@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section Head
    {
    <link href="~/areas/admin/css/home.main.css" rel="stylesheet" />
}
<div class="layui-fluid home-main">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-sm6 layui-col-md3">
            <div class="layui-card">
                <div class="layui-card-header">
                    访问情况
                    <span class="layui-badge layui-bg-orange layuiadmin-badge">周</span>
                </div>
                <div class="layui-card-body layuiadmin-card-list">
                    <p class="layuiadmin-big-font ">
                        访问信息:
                        <span class="layuiadmin-span-color latest_news_unread">0(次)</span>
                    </p>
                    <p>
                        访问总数:
                        <span class="layuiadmin-span-color latest_news">0(次)</span>
                    </p>
                </div>
            </div>
        </div>
        <div class="layui-col-sm6 layui-col-md3">
            <div class="layui-card">
                <div class="layui-card-header">
                    操作动态
                    <span class="layui-badge layui-bg-blue layuiadmin-badge">周</span>
                </div>
                <div class="layui-card-body layuiadmin-card-list">
                    <p class="layuiadmin-big-font ">
                        登录次数:
                        <span class="layuiadmin-span-color login_times">0(次)</span>
                    </p>
                    <p>
                        操作次数:
                        <span class="layuiadmin-span-color operation_times">0(次)</span>
                    </p>
                </div>
            </div>
        </div>
        <div class="layui-col-sm6 layui-col-md3">
            <div class="layui-card">
                <div class="layui-card-header">
                    系统错误
                    <span class="layui-badge layui-bg-cyan layuiadmin-badge">周</span>
                </div>
                <div class="layui-card-body layuiadmin-card-list">
                    <p>
                        未解决错误:
                        <span class="layuiadmin-span-color unresolved_error ">0(个)</span>
                    </p>
                    <p>
                        错误总数:
                        <span class="layuiadmin-span-color error_total">0(个)</span>
                    </p>
                </div>
            </div>
        </div>
        <div class="layui-col-sm6 layui-col-md3">
            <div class="layui-card">
                <div class="layui-card-header">
                    安全警告
                    <span class="layui-badge layui-btn-danger">周</span>
                </div>
                <div class="layui-card-body layuiadmin-card-list">
                    <p>
                        警告接口:
                        <span class="layuiadmin-span-color warning_Interface">0(个)</span>
                    </p>
                    <p>
                        警告总次数:
                        <span class="layuiadmin-span-color warning_total">0(次)</span>
                    </p>
                </div>
            </div>
        </div>
        <div class="layui-col-sm8">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-sm12">
                    <div class="layui-card">
                        <div class="layui-card-header">最新动态</div>
                        <div class="layui-card-body">
                            <div class="layui-row layui-col-space15 layui-table-body layui-table-main">
                                <table class="layui-table" lay-skin="line">
                                    <thead>
                                        <tr>
                                            <th><div class="layui-table-cell"><span>操作时间</span></div></th>
                                            <th><div class="layui-table-cell"><span>操作用户</span></div></th>
                                            <th><div class="layui-table-cell"><span>业务标题</span></div></th>
                                            <th><div class="layui-table-cell"><span>操作明细</span></div></th>
                                        </tr>
                                    </thead>
                                    <tbody class="operationList"></tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-row layui-col-space15">
                <div class="layui-col-sm12">
                    <div class="layui-card">
                        <div class="layui-card-header">系统错误</div>
                        <div class="layui-card-body">
                            <div class="layui-row layui-col-space15 layui-table-body layui-table-main">
                                <table class="layui-table" lay-skin="line">
                                    <thead>
                                        <tr>
                                            <th><div class="layui-table-cell"><span>报错时间</span></div></th>
                                            <th><div class="layui-table-cell"><span>系统类型</span></div></th>
                                            <th><div class="layui-table-cell"><span>异常标题</span></div></th>
                                            <th><div class="layui-table-cell"><span>错误明细</span></div></th>
                                        </tr>
                                    </thead>
                                    <tbody class="exceptionList"></tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-col-sm4">
            <div class="layui-card guest-book">
                <div class="layui-card-header">黑名单</div>
                <div class="layui-card-body">
                    <ul class="layui-timeline latestNews"></ul>
                </div>
            </div>
        </div>
    </div>
</div>

@section Foot
    {
    @*最新消息*@
    <script type="text/html" id="latestNews">
        {{# layui.each(d, function(index, item){ }}
        <li class="layui-timeline-item">
            <i class="layui-icon layui-timeline-axis"></i>
            <div class="layui-timeline-content layui-text">
                <h3 class="layui-timeline-title">
                    <label>{{item.create_date}}</label>
                    <a href="javascript:;" data-sender_id="{{item.sender_id}}" data-id="{{item.id}}" class="layui-btn layui-btn-xs replyNote">回复</a>
                    <a href="javascript:;" data-id="{{item.id}}" class="layui-btn layui-btn-xs layui-bg-cyan removeNote">删除</a>
                </h3>
                <h4 class="layui-timeline-title">
                    <label>{{item.title}}</label>
                </h4>
                <p>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{item.content}}
                </p>
            </div>
        </li>
        {{# }) }}
    </script>

    @*最新操作日志*@
    <script type="text/html" id="operationList">
        {{# layui.each(d, function(index, item){ }}
        <tr>
            <td>
                <div class="layui-table-cell" style="width:170px">
                    {{item.create_date}}
                </div>
            </td>
            <td>
                <div class="layui-table-cell">
                    {{item.user_name}}
                </div>
            </td>
            <td>
                <div class="layui-table-cell">
                    {{item.business_title}}
                </div>
            </td>
            <td align="left" class="">
                <div class="layui-table-cell" style="width:380px;">
                    {{item.detail}}
                </div>
            </td>
        </tr>
        {{# }) }}
    </script>

    @*最新异常日志*@
    <script type="text/html" id="exceptionList">
        {{# layui.each(d, function(index, item){ }}
        <tr>
            <td style="width:170px">
                <div class="layui-table-cell" style="width:170px">
                    {{item.create_date}}
                </div>
            </td>
            <td>
                <div class="layui-table-cell">
                    {{item.system_type_name}}
                </div>
            </td>
            <td>
                <div class="layui-table-cell" style="width:320px;">
                    {{item.exception_title}}
                </div>
            </td>
            <td align="left" class="">
                <div class="layui-table-cell" style="width:380px;">
                    {{item.detail}}
                </div>
            </td>
        </tr>
        {{# }) }}
    </script>

    @*消息回复*@
    <script type="text/html" id="massage_reply">
        <div style="padding: 10px;">
            <input type="hidden" class="layui-input" name="receiver_id" value="{{d.data}}">
            <div class="layui-form-item">
                <label class="layui-form-label layui-required">消息标题：</label>
                <div class="layui-input-block">
                    <textarea class="layui-textarea" lay-verify="required" name="title" maxlength="50" placeholder="请输入消息标题" style="min-height: 50px;"></textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label layui-required">消息内容：</label>
                <div class="layui-input-block layui-required">
                    <textarea class="layui-textarea" lay-verify="required" name="content" maxlength="200" placeholder="请输入消息内容" style="min-height: 200px"></textarea>
                </div>
            </div>
        </div>
    </script>

    <script src="~/areas/admin/js/home.main.js"></script>
}
